{% extends "base.html" %}
{% block title %}List all exams {% endblock %}
{% block content %}
    <h3>Open Exams</h3>
    <div class="list_block">
        {% for ex in exams.exams_open %}
            <div class="exam_list_item">
            <div class="exam_title"><a href="{% url Exams.views.take param_exam_id=ex.id %}">{{ ex.title }}</a></div>
            <div class="exam_list_options">Deadline: <i>{{ ex.deadline|date:'Y-m-d H:i' }}</i></div>
            </div>
        {% endfor %}
    </div>

    <h3>Exams taken</h3>
    <div class="list_block">
        {% for ex in exams.exams_taken %}
            <div class="exam_list_item">
                <div class="exam_title"><a href="{% url Exams.views.statistics param_exam_id=ex.id %}">{{ ex.title }}</a></div>
                <div class="exam_list_options">Deadline: <i>{{ ex.deadline|date:'Y-m-d H:i' }}</i></div>
            </div>
        {% endfor %}
    </div>

    <h3>Expired Exams (not taken)</h3>
    <div class="list_block">
        {% for ex in exams.exams_closed %}
            <div class="exam_list_item">
                <div class="exam_title">{{ ex.title }}</div>
                <div class="exam_list_options">Deadline: <i>{{ ex.deadline|date:'Y-m-d H:i' }}</i></div>
            </div>
        {% endfor %}
    </div>

{% endblock %}